package com.lenovo.testreport.qa.web.languagetestbypage.controller;

import com.lenovo.testreport.qa.web.languagetestbypage.service.QaWebLanguageCaseService;
import org.apache.catalina.servlet4preview.http.HttpServletRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @author CJF
 * @date 2018/12
 * @version Updated at 2019/05/24 By Howie Lu
 * <p>
 * 主要对CASE表进行操作，取出常规CASE信息
 */

@Controller
@RequestMapping("/qa/web/languagebypage/case")
public class QaWebLanguageCaseController {
    @Autowired
    private QaWebLanguageCaseService qaWebLanguageCaseService;

    //通过Rid查找报告对应的CASE表
    @RequestMapping("/FindByRid")
    public @ResponseBody
    Object FindByRid(HttpServletRequest request) {

        int id = Integer.valueOf(request.getParameter("rid"));
        return qaWebLanguageCaseService.findByRid(request.getParameter("tablename"), id);
    }


}
